// User.js
var counter = 0;
function User(name, age){
    this.id = counter++;
    this.name = name;
    this.age = age;
    this.say = function(){
        var tpl = "{0}: My name is {1}, I'm {2} years old!";
        var str = tpl.replace('{1}', this.name)
            .replace('{2}', this.age)
            .replace('{0}', this.id);
        console.log(str);
        return str;
    }
}
module.exports = User;